<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="../jsLib/angular.js"></script>

    <title></title>
</head>
<body  ng-app="app" ng-controller="myControl">
<hello aa="{{bb}}"></hello>
<script>
    var app = angular.module('app',[]);
    app.controller("myControl",function($scope){
        $scope.bb="年后";
    })
    app.directive('hello',function(){
        return{
            restrict:"AE",
            scope:{
                aa:"@"
            },//独立scope
            template:'<div><input ng-model="aa">{{aa}}</div>',
            replace:"true",
           /* link:function(scope,element,attr){
                scope.aa=attr.show;
            }*/

        }
    })
</script>
</body>
</html>